home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-03-18 | 1.3 KB | 51 lines | [TEXT/ALFA] |
- // ===========================================================================
- //
- // GSError.c
- //
- // Copyright (C) 1996 Apple Computer, Inc. All rights reserved.
- //
- // ===========================================================================
-
-
- // ===========================================================================
- // Includes
- // ===========================================================================
-
- #include "GSError.h"
-
-
- #ifdef kGSDebug
-
- // ===========================================================================
- // GSError
- // ===========================================================================
- void
- GSError(
- const char* inMessage)
- {
- #if (kQAPlatform == kQAMacOS)
- Str255 pascalMessage;
- StringPtr pascalMessageP;
- const char* messageP;
- long length;
-
- // copy the C string inMessage into the Pascal string pascalMessage
- for (pascalMessageP = &pascalMessage[1], messageP = inMessage,
- length = 0; *messageP && length < 255;
- pascalMessageP++, messageP++, length++) {
- *pascalMessageP = (unsigned char) *messageP;
- }
-
- // set the length of the Pascal string copy of inMessage
- pascalMessage[0] = length;
-
- // break to the low-level debugger with a message string
- DebugStr((ConstStr255Param) pascalMessage);
- #else
- fprintf(stderr, "%s\n", inMessage);
- #endif
- }
-
- #endif
-
-